<template>
	<view class="box-img">
		<page-head :transparent='false'><slot slot="title">{{title.length>10?title.substr(0,10)+'...':title}}</slot></page-head>
		<image class="img1" src="../../static/img/guidance/6184-1.png" mode="widthFix"></image>
		<view class="img2">
			<image class="img1" src="../../static/img/guidance/6184-2.png" mode="widthFix"></image>
			<span class="url">http://down.sqqmall.com</span>
			<video id="myVideo" :src="videoUrl" @error="videoErrorCallback" controls></video>
		</view>
		<image class="img1" src="../../static/img/guidance/6184-3.png" mode="widthFix"></image>
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				videoUrl: 'https://sqqmall.oss-cn-shenzhen.aliyuncs.com/3.mp4',
				title: '下载引导页'
			}
		},
		methods:{
			videoErrorCallback: function(e) {
				// console.log(123)
				uni.showModal({
					content: '视频出错，请稍后重试!',
					showCancel: false
				})
			},
		}
	}
</script>

<style lang="scss">
	.box-img{
		width: 100%;
		
		.img1{
			width: 100%;
			display: block;
			overflow: hidden;
			overflow-y: auto;
		}
		
		.img2{
			width: 100%;
			position: relative;
			display: block;
			overflow: hidden;
			overflow-y: auto;
			
			.img1{
				width: 100%;
			}
			
			#myVideo{
				width: 500px;
				height: 300px;
				position: absolute;
				z-index: 5;
				top: 48%;
				left: 16%;
			}
			
			.url{
				position: absolute;
				-webkit-touch-callout: all;
				-webkit-user-select: all;
				-moz-user-select: all;
				-ms-user-select: all;
				user-select: all;
				color: #a00000;
				font-size: 30px;
				font-weight: 600; 
				top: 240px;
				left: 198px;
			}
		}
	}
</style>
